

// #ifndef TASK_UART_H
// #define TASK_UART_H

#ifndef TASK_UART_H
#define TASK_UART_H

#include <stdint.h>

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

/* ctl order */
/* 控制线地址参数 */
#define GR1_CTL_ADDRESS 0x08
#define GR2_CTL_ADDRESS 0x88
#define GR3_CTL_ADDRESS 0x48
#define GR4_CTL_ADDRESS 0xC8
#define GR5_CTL_ADDRESS 0x28
#define GR6_CTL_ADDRESS 0xA8

/* LED显示对应参数 */
#define LED_DISPLAY_CTR 0x18 /* 使能输出命令					 */
#define LED_DISPLAY_PAR 0xFF /* 输出功率参数,Max:0xFF */

void task_uart_init(void);

void tm1652_set_display(bool on, uint8_t duty, uint8_t current);
void tm1652_multi_write(uint8_t *data, uint8_t len);
void tm1652_set_led(uint8_t index, bool on);

#ifdef __cplusplus
}
#endif

#endif // TASK_UART_H
